__author__ = 'Vivienfanghua'
import arcpy
import os
Path="H:/100/"
a=os.listdir(Path)
for i in a:
    inputfc=Path+i+"/"+i+".shp"
    if os.path.isfile(inputfc):
        pass
        # print i
        # arcpy.Project_management(inputfc, "D:/Project/Shp/"+i,"GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]", "", "PROJCS['M',GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Mercator_Auxiliary_Sphere'],PARAMETER['False_Easting',0.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',0.0],PARAMETER['Standard_Parallel_1',60.0],PARAMETER['Auxiliary_Sphere_Type',0.0],UNIT['Meter',1.0]]")
    else:
        files=os.listdir(Path+i)
        for j in files:
            if j.endswith(".shp"):
                inputfc=Path+i+"/"+j
                arcpy.Project_management(inputfc, "D:/Project/Shp/"+i,"GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]", "", "PROJCS['M',GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Mercator_Auxiliary_Sphere'],PARAMETER['False_Easting',0.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',0.0],PARAMETER['Standard_Parallel_1',60.0],PARAMETER['Auxiliary_Sphere_Type',0.0],UNIT['Meter',1.0]]")